<?php

namespace App\Http\Requests\Admin\Customer\RecommendProduct;

use App\Http\Requests\ApiRequest;
use App\Models\Customer\CustomerRelateHmSkin;
use App\Models\Customer\CustomerRelateWaxSkin;

/**
 * @property array skin_ids
 * @property string skin_type
 */
class RecommendProductDeleteRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'skin_ids'   => 'required|array',
            'skin_ids.*' => 'required|int|min:1',
            'skin_type'  => 'required|string|in:' . class_basename(CustomerRelateWaxSkin::class) . ',' . class_basename(CustomerRelateHmSkin::class)
        ];
    }
}
